import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:"/home"
  },
  {
    path: '/home',
    name: 'home',
    component: () => import( '../views/Home.vue')
  },
  {
    path: '/swagger',
    name: 'swagger',
    component: () => import( '../views/Swagger.vue')
  },
  {
    path: '/word',
    name: 'word',
    component: () => import( '../views/Word.vue'),
    children:[
      {
        path: 'quan',
        name: 'quan',
        component: () => import( '../views/Words/Quan.vue'),
      },
      {
        path: 'leave',
        name: 'leave',
        component: () => import( '../views/Words/Leave.vue'),
      },
      {
        path: 'person',
        name: 'person',
        component: () => import( '../views/Words/Person.vue'),
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
